package com.atguigu.day10.test14;

public class Circle extends Graphic{
    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    public Circle(double r) {
        this.r = r;
    }

    private double r;
    public double getArea(){
        return Math.PI*r*r;
    }
    public double getPerimeter(){
        return Math.PI*r*2;
    }
    public String getInfo(){
        return "半径为:"+r+",面积为:"+getArea()+",周长为:"+getPerimeter();
    }
}
